package com.naiterui.ehp.bs.emr.vo.openapi.his;

import com.naiterui.ehp.bs.emr.utils.his.param.resp.AnalyzeResp;
import com.naiterui.ehp.bs.emr.utils.his.param.resp.AnalyzeResult;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import java.util.List;

/**
 * 化验记录
 *
 * @author yiren
 * @since 2022/1/25
 */
@Data
@Builder
public class AnalyzeRecordVO {
	@ApiModelProperty(value = "就诊人姓名")
	private String inquirerName;

	@ApiModelProperty(value = "性别")
	private String gender;

	@ApiModelProperty(value = "年龄")
	private String age;

	@ApiModelProperty(value = "申请科室")
	private String applyDepartment;

	@ApiModelProperty(value = "申请医生")
	private String applyDoctor;

	@ApiModelProperty(value = "申请时间")
	private String applyTime;

	@ApiModelProperty(value = "样本类型")
	private String sampleType;

	@ApiModelProperty(value = "临床诊断")
	private String diagnosis;

	@ApiModelProperty(value = "化验名称")
	private String analyzeName;

	@ApiModelProperty(value = "化验结果")
	private List<AnalyzeResult> items;

	public static AnalyzeRecordVO of(AnalyzeResp resp) {
		return AnalyzeRecordVO.builder()
				.inquirerName(resp.getInquirerName())
				.gender(resp.getGender())
				.age(resp.getAge())
				.applyDepartment(resp.getApplyDepartment())
				.applyDoctor(resp.getApplyDoctor())
				.applyTime(resp.getApplyTime())
				.sampleType(resp.getSampleType())
				.diagnosis(resp.getDiagnosis())
				.analyzeName(resp.getAnalyzeName())
				.items(resp.getItems())
				.build();
	}


}
